home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / kill-the-dragons.swf / scripts / DefineSprite_828 / frame_6 / DoAction.as
Encoding:
Text File  |  2011-12-21  |  301 b   |  13 lines

  1. oppThrow();
  2. oppX = this._x;
  3. oppY = this._y;
  4. differenceX = oppXnew - oppX;
  5. differenceY = oppYnew - oppY;
  6. if(Math.abs(differenceX) < 1 && Math.abs(differenceY) < 1)
  7. {
  8.    gotoAndStop("pause");
  9.    play();
  10. }
  11. this._x += differenceX / _parent.oppSpeed;
  12. this._y += differenceY / _parent.oppSpeed;
  13.